
// bdc2View.h : interface of the Cbdc2View class
//

#pragma once
#include "TrayIcon.h"


class Cbdc2View : public CHtmlView
{
protected: // create from serialization only
	Cbdc2View();
	DECLARE_DYNCREATE(Cbdc2View)

// Attributes
public:
	Cbdc2Doc* GetDocument() const;

	BOOL isStartUp;
	BOOL swch2MainWin;

	static const UINT WM_NOTIFY_ICON			= WM_USER + 1;
	static const UINT WM_LOGIN					= WM_USER + 2;
	static const UINT WM_GET_TAG_LIST			= WM_USER + 3;
	static const UINT WM_GET_TAG_RECORD_LIST	= WM_USER + 4;
	static const UINT WM_ADD_RECORD				= WM_USER + 5;
	static const UINT WM_UPDATE_RECORD			= WM_USER + 6;
	static const UINT WM_DEL_RECORD				= WM_USER + 7;
	static const UINT WM_ADD_TAG				= WM_USER + 8;
	static const UINT WM_UPDATE_TAG				= WM_USER + 9;
	static const UINT WM_DEL_TAG				= WM_USER + 10;
	static const UINT WM_GET_TODAY_MEMORY_LIST	= WM_USER + 11;
	static const UINT WM_UPDATE_MEMORY			= WM_USER + 12;

private:
	CTrayIcon m_trayIcon;

// Operations
public:

// Overrides
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void OnInitialUpdate(); // called first time after construct

// Implementation
public:
	virtual ~Cbdc2View();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	afx_msg LRESULT OnNotifyIcon(WPARAM, LPARAM);
	afx_msg LRESULT OnLogin(WPARAM, LPARAM);
	afx_msg LRESULT OnGetTagList(WPARAM, LPARAM);
	afx_msg LRESULT OnGetTagRecordList(WPARAM, LPARAM);
	afx_msg LRESULT OnAddRecord(WPARAM, LPARAM);
	afx_msg LRESULT OnUpdateRecord(WPARAM, LPARAM);
	afx_msg LRESULT OnDelRecord(WPARAM, LPARAM);
	afx_msg LRESULT OnAddTag(WPARAM, LPARAM);
	afx_msg LRESULT OnUpdateTag(WPARAM, LPARAM);
	afx_msg LRESULT OnDelTag(WPARAM, LPARAM);
	afx_msg LRESULT OnGetTodayMemoryList(WPARAM, LPARAM);
	afx_msg LRESULT OnUpdateMemory(WPARAM, LPARAM);
	DECLARE_MESSAGE_MAP()

public:
	virtual void OnDocumentComplete(LPCTSTR lpszURL);
	virtual HRESULT OnGetExternal(LPDISPATCH *lppDispatch);
};

#ifndef _DEBUG  // debug version in bdc2View.cpp
inline Cbdc2Doc* Cbdc2View::GetDocument() const
   { return reinterpret_cast<Cbdc2Doc*>(m_pDocument); }
#endif

